home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / util / misc / stow100.lha / STOW / ansi.h next >
Text File  |  1994-08-22  |  1KB  |  49 lines

  1. #define   PREAMBLE  "\033["
  2.  
  3. #define   CLEAR     "2J"
  4. #define   CLS       '\014'
  5. #define   NORMAL    '0'
  6. #define   BOLD      '1'
  7. #define   HIGHLIGHT '2'
  8. #define   ITALICS   '3'
  9. #define   UNDERLINE '4'
  10. #define   REVERSE   '7'
  11. #define   UP        'A'
  12. #define   DOWN      'B'
  13. #define   RIGHT     'C'
  14. #define   LEFT      'D'
  15. #define   POSITION  'H'
  16. #define   COLOR     'm'
  17.  
  18. #define   FGROUND   '3'
  19. #define   BGROUND   '4'
  20.  
  21. #define   BLACK     '0'
  22. #define   RED       '1'
  23. #define   GREEN     '2'
  24. #define   YELLOW    '3'
  25. #define   BLUE      '4'
  26. #define   PURPLE    '5'
  27. #define   CYAN      '6'
  28. #define   WHITE     '7'
  29.  
  30. #define ScreenCommand(COMMAND) printf("%s%c",PREAMBLE,COMMAND)
  31.  
  32. #define ChangeColors(FRONT,BACK) printf("%s%c%c;%c%c%c",PREAMBLE,FGROUND,FRONT,BGROUND,BACK,COLOR)
  33.  
  34. #define ChangeMode(TYPE) printf("%s%c%c",PREAMBLE,TYPE,COLOR)
  35.  
  36. #define MoveCursor(DISTANCE,DIRECTION) printf("%s%d%c",PREAMBLE,DISTANCE,DIRECTION)
  37.  
  38. #define PosCursor(DOWN,ACROSS) printf("%s%d;%d%c",PREAMBLE,DOWN,ACROSS,POSITION)
  39.  
  40. #define ClearScreen() printf("%s%s%c",PREAMBLE,CLEAR,CLS)
  41.  
  42.  
  43. #define   TOP_LEFT  '+'
  44. #define   TOP_RGHT  '+' 
  45. #define   BOT_LEFT  '+'
  46. #define   BOT_RGHT  '+'
  47. #define   VERT      '|'
  48. #define   HORZ      '-'
  49.